package com.hjt.gulimall.order.web;

import com.alipay.api.AlipayApiException;
import com.hjt.gulimall.order.config.AlipayTemplate;
import com.hjt.gulimall.order.service.OrderService;
import com.hjt.gulimall.order.vo.PayVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author:97007
 * @date:2021/10/15 20:53
 */
@Controller
public class PayController {



    @Autowired
    private OrderService orderService;

    @ResponseBody
    @GetMapping(value = "payOrder", produces = "text/html")
    public String pay(@RequestParam("orderSn") String orderSn) throws AlipayApiException {


        return orderService.pay(orderSn);
    }
}
